
<h1>Pohon Jaringan Board</h1>
<?php
$message = '';
?>
<style>
    /* AWAL TREE */
    .tree { width:680px; overflow:auto; }
    .tree { padding:10px 0; font-size:7pt; }
    
    .tree th { text-align:center; margin:0; padding:0; }
    .tree td { font-family:verdana, Arial, Helvetica, sans-serif; padding:0 1px; }
    
    .tree .box-1, 
    .tree .box-2, 
    .tree .box-3, 
    .tree .box-4 { border-collapse: collapse; margin:0; padding:0; border:2px solid #cc7b00; background:#fff0da; }
    
    .tree .box-1 td, 
    .tree .box-2 td, 
    .tree .box-3 td, 
    .tree .box-4 td { text-align:center; padding:15px 0 5px 0 !important; }
    
    .tree .box-1 .mid, 
    .tree .box-2 .mid, 
    .tree .box-3 .mid, 
    .tree .box-4 .mid { font-weight:bold; color:#fff; border-bottom:1px solid #cc7b00; background:#fd9901; }
    
    .tree .box-1 .data, 
    .tree .box-2 .data, 
    .tree .box-3 .data, 
    .tree .box-4 .data { font-weight:bold; }
    
    /*
    .tree .box-1 { border:2px solid #1a4e7e; background:#dff0ff; }
    .tree .box-2 { border:2px solid #cc7b00; background:#fff0da; }
    .tree .box-3 { border:2px solid #69a500; background:#e0ffda; }
    .tree .box-4 { border:2px solid #e6c300; background:#fff6c7; }
    
    .tree .box-1 .mid { color:#fff; border-bottom:1px solid #1a4e7e; background:#5a91c3; }
    .tree .box-2 .mid { color:#fff; border-bottom:1px solid #cc7b00; background:#fd9901; }
    .tree .box-3 .mid { color:#333; border-bottom:1px solid #69a500; background:#a1fd01; }
    .tree .box-4 .mid { color:#333; border-bottom:1px solid #e6c300; background:#fdd601; }
    */
    
    .tree .box-1 .mid { font-size:10pt; }
    .tree .box-2 .mid { font-size:9pt; }
    .tree .box-3 .mid { font-size:8pt; }
    .tree .box-4 .mid { font-size:7pt; }
    
    .tree .box-1 .data { color:#444; font-size:11pt; }
    .tree .box-2 .data { color:#444; font-size:10pt; }
    .tree .box-3 .data { color:#444; font-size:9pt; }
    .tree .box-4 .data { color:#444; font-size:8pt; }
    /* AKHIR TREE */
</style>
<br />
<div class="tree">
    <table border="0" cellpadding="0" cellspacing="0" align="center" width="100%">
        <tr>
            <td width="100%" colspan="16" align="center">
                <table class="box-1" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[1]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[1]['member_name']; ?></td></tr>
                </table>
            </td>
        </tr>
        <tr>
            <td width="100%" colspan="16" height="10"></td>
        </tr>
        <tr>
            <td width="50%" colspan="8" align="center">
                <table class="box-2" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[2]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[2]['member_name']; ?></td></tr>
                </table>
            </td>
            <td width="50%" colspan="8" align="center">
                <table class="box-2" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[3]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[3]['member_name']; ?></td></tr>
                </table>
            </td>
        </tr>
        <tr>
            <td width="100%" colspan="16" height="10"></td>
        </tr>
        <tr>
            <td width="12.5%" colspan="4" align="center">
                <table class="box-3" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[4]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[4]['member_name']; ?></td></tr>
                </table>
            </td>
            <td width="12.5%" colspan="4" align="center">
                <table class="box-3" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[5]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[5]['member_name']; ?></td></tr>
                </table>
            </td>
            <td width="12.5%" colspan="4" align="center">
                <table class="box-3" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[6]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[6]['member_name']; ?></td></tr>
                </table>
            </td>
            <td width="12.5%" colspan="4" align="center">
                <table class="box-3" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[7]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[7]['member_name']; ?></td></tr>
                </table>
            </td>
        </tr>
        <tr>
            <td width="100%" colspan="16" height="10"></td>
        </tr>
        <tr>
            <td width="12.5%" colspan="2" align="center">
                <table class="box-4" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[8]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[8]['member_name']; ?></td></tr>
                </table>
            </td>
            <td width="12.5%" colspan="2" align="center">
                <table class="box-4" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[9]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[9]['member_name']; ?></td></tr>
                </table>
            </td>
            <td width="12.5%" colspan="2" align="center">
                <table class="box-4" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[10]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[10]['member_name']; ?></td></tr>
                </table>
            </td>
            <td width="12.5%" colspan="2" align="center">
                <table class="box-4" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[11]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[11]['member_name']; ?></td></tr>
                </table>
            </td>
            <td width="12.5%" colspan="2" align="center">
                <table class="box-4" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[12]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[12]['member_name']; ?></td></tr>
                </table>
            </td>
            <td width="12.5%" colspan="2" align="center">
                <table class="box-4" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[13]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[13]['member_name']; ?></td></tr>
                </table>
            </td>
            <td width="12.5%" colspan="2" align="center">
                <table class="box-4" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[14]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[14]['member_name']; ?></td></tr>
                </table>
            </td>
            <td width="12.5%" colspan="2" align="center">
                <table class="box-4" border="0" cellpadding="0" cellspacing="0" width="100%" height="110">
                    <tr><td class="mid" height="25"><?php echo $data[15]['board_network_mid']; ?></td></tr>
                    <tr><td class="data"><?php echo $data[15]['member_name']; ?></td></tr>
                </table>
            </td>
        </tr>
    </table>
</div>
<?php
if($follower != false ) :
    $i=1;
?>
<br />
<h2>Daftar Follower</h2>
<div class="list">
    <table cellpadding="0" cellspacing="0">
        <tr>
            <th width="10">No.</th>
            <th width="150">ID Member</th>
            <th>Nama</th>
            <th>Geneology</th>
        </tr>
        <?php
        foreach ($follower as $id){
            $member_id = function_lib::get_one("board_network_network_mid", "sys_board_network ", "board_network_id = '".$id['board_follower_board_network_id']."'");
            $network_id = function_lib::get_one("board_network_member_id","sys_board_network","board_network_id = '".$id['board_follower_board_network_id']."'");
            $nama = function_lib::get_member_name($network_id);
            echo "<tr>
                    <td align='right'>$i.</td>
                    <td>$member_id</td><td>$nama</td>
                    <td align='center'><a href='" . Yii::app()->getBaseUrl() . "/member/board/geneology/active/" . $member_id. "/1'>Geneologi</a></td>
                  </tr>";


            $i++;
        }
        ?>

    </table>

</div>
<?php
endif;
?>